#pragma once
#include <map>
#include "CLComString.h"
#include "CLocalObject.h"
#include "CLComLibrarys_global.h"
//CLCOMLIBRARYS_EXPORT

enum ECHAINITEM_RETURN_VALUE
{
	ECHAINITEM_RETURN_VALUE_FALSE = 0,
	ECHAINITEM_RETURN_VALUE_OK,
};

class CLCOMLIBRARYS_EXPORT CChainItem
{
public:
    CChainItem(CLComString key, CChainItem*	pFather, int itemType);
	~CChainItem();

public:
    CChainItem* AddSon(CLComString sID, int	itemType);
	int AddSon(CChainItem* pSon);
    void DelSon(CLComString sid);
	CChainItem* GetFather();
    CChainItem* GetSon(CLComString sID);

    CLComString GetKey();
    int GetKeyObjType();

public:
    CLComString			m_key;
	CChainItem*			m_pFather;
    int                 m_itemType;

    map<CLComString, CChainItem*> m_mapSons;
};

